package reese;

import java.io.IOException;

public class Test {
    
    /**    
     * @param args    
     */    
    public static void main(String[] args) throws IOException {
         StringBuffer buffer= new StringBuffer("colin");
        new Thread(new Temp(buffer)).start();
        buffer =new StringBuffer();
//        buffer.append("1233");
        System.out.println(buffer);
        System.in.read();
    }     
         
    public static void SChange (final StringBuffer str) {
        //str= new StringBuffer("huang");     
        str.append(" huang");
        System.out.println( str);
    }

    static class Temp implements Runnable{
        final StringBuffer buffer;

        Temp(StringBuffer buffer) {
            this.buffer = buffer;
        }

        @Override
        public void run() {
            buffer.append(" huang");
            while (true){

                System.out.println( buffer);
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }
    }
    
}    